const crypto = require("crypto");

function translate(response) {
    var keystr = "ydsecret://query/key/B*RGygVywfNBwpmBaZg*WT7SIOUP2T0C9WHMZN39j^DAdaZhAnxvGcCY6VYFwnHl";
    var ivstr = "ydsecret://query/iv/C@lZe2YzHtZ2CYgaXKSVfsb7Y4QWHjITPPZ0nQp87fBeJ!Iv6v^6fvi2WN@bYpJ4";
    // BUffer.alloc()创建缓冲区对象
    var a = Buffer.alloc(16, crypto.createHash("md5").update(keystr).digest())
        , c = Buffer.alloc(16, crypto.createHash("md5").update(ivstr).digest())
        , r = crypto.createDecipheriv("aes-128-cbc", a, c);
    let s = r.update(response, "base64", "utf-8");
    return s += r.final("utf-8"),
        s
}